
function resultArray = parseMLF(filename)

% read each record (actually spread over 3 lines) into columns, discarding all but probe, gallery and scores
[a,probe,c,d,gal,score,g] = textread(filename,'%s%s%s%s%s%f%s','whitespace',' S\t\n','headerlines',1);
I = find(cellfun('length',gal) - 3); % exclude records with SENT
a = char(gal(I));
galID = str2num(a(:,1:3)); % convert to numeric ID
a = char(probe(I));
probeID = str2num(a(:,1:3)); % convert to numeric ID
score = score(I);

resultArray = [probeID, galID, score];
